package com.example.feigntest.feignclient;

import com.example.feigntest.controller.FeignDecoderTestController;
import com.example.feigntest.dto.Fruit;
import com.example.feigntest.feignclient.config.DecoderConfig;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * 描述：测试 feign Decoder 编码
 *
 * @author YangQun by 2020/10/17
 */
@FeignClient(name = "DecoderTest",
        configuration = DecoderConfig.class,
        url = "http://localhost:${server.port}")
public interface DecoderTestClient {

    /**
     * 测试请求, 该 FeignDecoderTestController 返回的格式不是标准 json
     */
    @PostMapping(FeignDecoderTestController.URI)
    public Fruit test();

}
